import { createApp } from 'vue'
import App from '@/App.vue'
// 引入element-plus插件与样式
import ElementPlus from 'element-plus'
// @ts-ignore  配置element-plus国际化
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'

// 获取应用实例对象
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn, //配置element-plus国际化
})
// svg插件需要配置的代码
import 'virtual:svg-icons-register'
// 将将所有的组件定义为全局组件
import gloablComponent from './components/index'
app.use(gloablComponent)

import axios from 'axios'

axios({
  url: '/api/user/login',
  method: 'post',
  data: {
    username: 'admin',
    password: '111111',
  },
})

// 引入全局样式
import '@/style/index.scss'

app.mount('#app')
